﻿using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
using QMERP.Domain.Entities;

namespace QMERP.Infrastructure.EFCore.Mappings
{
    public class StockActionLogDetailMapping : IEntityTypeConfiguration<StockActionLogDetail>
    {
        public void Configure(EntityTypeBuilder<StockActionLogDetail> builder)
        {
            builder.Property(x => x.DegreesType).HasMaxLength(5);
            builder.Property(x => x.SPH);
            builder.Property(x => x.CYL);
            builder.Property(x => x.ADD);
            builder.Property(x => x.Qty);
            builder.Property(x => x.StockQty);

            builder.Property(x => x.StockActionLogId);

            builder.HasIndex(x => x.Id);
            builder.HasIndex(x => x.DegreesType);
            builder.HasIndex(x => x.StockActionLogId);
        }
    }
}
